package ph.loong.deliveryman.ui.wallet

import android.content.Intent
import android.os.Bundle
import android.view.View
import deliveryman.loong.ph.deliveryman.R
import kotlinx.android.synthetic.main.activity_my_wallet.*
import ph.loong.deliveryman.base.BaseActivity

class MyWalletActivity : BaseActivity(), View.OnClickListener, BaseActivity.onRightClickListener {


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_my_wallet)
        setTitle("钱包")
        setRightImg(getDrawable(R.drawable.icon_bill_detail))
        initView()
        super.setOnRightImgClickListener(this)
    }

    private fun initView() {
        card_manager.setOnClickListener(this)
    }

    override fun onRightImgClick() {
        val intent = Intent(this, BillDetailActivity::class.java)
        startActivity(intent)
    }

    override fun onClick(v: View?) {
        when {
            v?.id == R.id.card_manager -> {
                val intent = Intent(this,BindCardActivity::class.java)
                startActivity(intent)
            }
        }
    }

}
